package day9.printer;

/**
 * @author oldliu
 * @since 1.0
 */
//da yinji
public class Printer {
    //品牌和价格
    private String brand;
    private int price;

    //!!!!!!!!!!
    private Ink ink;//接墨水
    private Paper paper;//按纸张

    public Printer(){

    }

    //geng huanliule
    public void setInk(Ink ink) {
        this.ink = ink;
    }

    public void setPaper(Paper paper) {
        this.paper = paper;
    }

    //打印的内容为s
    public void print(String s){
        System.out.println("用"+ink.getColor()+"在打印！");
        paper.print(s);
    }
    public void show(){
        System.out.println("这是一个打印机，品牌是:"+brand+",价格是"+price+"元");
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public void setPrice(int price) {
        this.price = price;
    }
}
